<%@ page language="java" errorPage="/framework/jsp/error.jsp"
	pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ include file="/cring/jsp/admin/header.jsp"%>
<%@include file="/framework/jsp/taglibs.jsp"%>
<%@ include file="/cring/jsp/admin/menu.jsp"%>
<%@ taglib prefix="xwcms" uri="/WEB-INF/CMSConfig/com.xwtech.cms.tld"%>
<script>
    String.prototype.trim = function() {
          return this.replace(/(^\s+)|\s+$/g,"");
    }
	function userCheck() {
        var username = document.addBackGroundUser.login_name.value;
        var re = /^[a-zA-Z]\w{5,17}$/;
        if(username.trim()=="") {
            window.alert("登陆帐号不能为空!");
            return false;
        }
        if (!re.test(username)) {
        	window.alert("登陆帐号格式不符合要求！");
        	return false;
        }
    }
    function returnLastPage() { 
	    window.location.href = "/cring/jsp/admin/bgUserList.jsp";
    }
</script>
<br>
<form name="addBackGroundUser" method="post"
	action="/cring/jsp/admin/backGroundUser.do"
	style="display: inline" enctype="multipart/form-data"
	onsubmit="return userCheck();">
	<table width="100%" border="0" align="center" cellpadding="0"
		cellspacing="0" class="table_big">
		<tr>
			<td>
				<table width="100%" border="0" align="center" cellpadding="0"
					cellspacing="0">
					<tr>
						<td width="4" height="4">
							<img src="/cring/image/admin/title_r4_c3.gif" width="4"
								height="4">
						</td>
						<td height="4">
							<img src="/cring/image/admin/title_r4_c4.jpg" width="100%"
								height="4">
						</td>
						<td width="4" height="4">
							<img src="/cring/image/admin/title_r4_c8.gif" width="4"
								height="4">
						</td>
					</tr>
				</table>
				<table width="100%" border="0" align="center" cellpadding="0"
					cellspacing="0">
					<tr>
						<td width="4" background="/cring/image/admin/title_r5_c3.jpg"
							bgcolor="#CCCCCC">
							&nbsp;
						</td>
						<td bgcolor="#EEF7FD">
							<table width="98%" border="0" align="center" cellpadding="0"
								cellspacing="4">
								<tr>
									<td width="24">
										<img src="/cring/image/admin/title_r6_c5.gif" width="24"
											height="24">
									</td>
									<td class="font_title_normal">
										新增后台用户（
										<font color="red">*</font>为必填项目）
									</td>
								</tr>
							</table>
							<table width="98%" border="0" align="center" cellpadding="0"
								cellspacing="0">
								<tr>
									<td height="12" valign="top">
										<table width="100%" border="0" align="center" cellpadding="0"
											cellspacing="1">
											<tr>
												<td height="5"
													background="/cring/image/admin/title_r10_c5.jpg"></td>
											</tr>
										</table>
										<table width="97%" border="0" cellpadding="0" cellspacing="1"
											class="table_normal">
											<tr>
												<td width="100" height="36" class="td_item_right">
													登陆帐号:
												</td>
												<td class="td_normal_left">
													<input name="login_name" type="text" class="input_normal"
														value="" size="20">
												</td>
												<td width="60%" class="td_normal_left">
													<font color="red">*</font> &nbsp;&nbsp英文字母开头，由字母、下划线、数字组成，长度为6-18位
												</td>
											</tr>
											<tr>
												<td height="28" class="td_item_right">
													姓名:
												</td>
												<td class="td_normal_left">
													<input name="user_name" type="text" class="input_normal"
													  maxlength="30" size="20">
												</td>
												<td class="td_normal_left">
													姓名可以为空，此时会将登录帐号作为姓名填入
												</td>
											</tr>
											<tr id="web3">
												<td height="28" class="td_item_right">
													所属用户组:
												</td>
												<td class="td_normal_left">
													<xwcms:link name="role_id" next="false" num="1"
														style="select_normal"  title="----------------"
														sql="select role_id,role_name from sys_role where role_status='A' " />
												</td>

												<td class="td_normal_left">
													当选择默认的"----------------"时，则不为用户选择所属用户组
												</td>
											</tr>
										</table>
									</td>
									<td width="4" background="/cring/image/admin/title_r5_c9.jpg"
										bgcolor="#CCCCCC">
										&nbsp;
									</td>
								</tr>
							</table>
							<table height="60" border="0" align="center" cellpadding="0"
								cellspacing="20">
								<tr>
									<td align="center">
										<div align="center">
											<input type="hidden" name="method" value="addUser">
											<input type="hidden" name="_success" value="61005">
											<input type="hidden" name="_failure" value="16001">
											<!-- 这里改成提交成功跳转页面，即用户显示页面 -->
											<input type="hidden" name="_url"
												value="/cring/jsp/admin/addBackGroundUser.jsp">
											<input type="hidden" name="checkQuery"
												value="/admin/queryFlameLogin.xml">
											<input type="submit" class="button_xy_normal" value=" 保 存 ">
										</div>
									</td>
									<td align="center">
										<input type="reset" class="button_xy_normal" value=" 重 填 ">
									</td>
									<td align="center">
										<input type="reset" class="button_xy_normal" value=" 返 回 " onClick="returnLastPage();">
									</td>
								</tr>
							</table>
							<table width="100%" border="0" align="center" cellpadding="0"
								cellspacing="0">
								<tr>
									<td width="4" height="4">
										<img src="/cring/image/admin/title_r10_c3.gif" width="4"
											height="4">
									</td>
									<td height="4">
										<img src="/cring/image/admin/title_r12_c4.jpg" width="100%"
											height="4">
									</td>
									<td width="4" height="4">
										<img src="/cring/image/admin/title_r10_c8.gif" width="4"
											height="4">
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</form>
<br>
<%@ include file="/cring/jsp/admin/footer.jsp"%>